Skip to content

Harden download attachment filenames - #139

Open
vagdotdev wants to merge 1 commit into
tscircuit:mainfrom
vagdotdev:bounty/download-filename-header-5
Open

Harden download attachment filenames#139
vagdotdev wants to merge 1 commit into
tscircuit:mainfrom
vagdotdev:bounty/download-filename-header-5

Conversation

@vagdotdev

Copy link
Copy Markdown

Summary

  • add a shared Content-Disposition attachment helper that derives a basename and strips quoted-string/control-character hazards
  • use the helper for direct database downloads, path downloads, disk proxy downloads, and HTTP proxy downloads
  • add regression coverage for unsafe database and disk-proxy filenames so downloads still succeed and no injected header appears

Validation

  • bun test tests/routes/files.test.ts tests/routes/file-proxy02.test.ts
  • bun test
  • bunx tsc --noEmit
  • bun run format:check
  • bun run build
  • git diff --check

/claim #5

@vagdotdev

Copy link
Copy Markdown
Author

/claim #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant